package com.sdr.tackvideo.tackvideo;

import android.view.SurfaceHolder;

/**
 * Created by Administrator on 2017/5/17.
 */

public class SHCallBack implements SurfaceHolder.Callback {
    private SHCallbackListener mListener;

    public SHCallBack(SHCallbackListener listener) {
        mListener = listener;
    }

    @Override
    public void surfaceCreated(SurfaceHolder holder) {
        mListener.surfaceCreated(holder);
    }

    @Override
    public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {

    }

    @Override
    public void surfaceDestroyed(SurfaceHolder holder) {
        mListener.surfaceDestroyed(holder);
    }

    interface SHCallbackListener{
        void surfaceCreated(SurfaceHolder holder);
        void surfaceDestroyed(SurfaceHolder holder);
    }
}
